<template>
	<view class="lottery-success-container" :style="{backgroundImage:'url('+info.expandSeven+')'}">
		<image :src="info.expandTwo" class="download" @click="onDownload()"></image>
		<image :src="info.expandEight" class="kefu" @click="onKefu()"></image>
	</view>
</template>

<script>
	import {activityInfo,activityLottery,activityExtract,activitySuccess } from '@/common/http.api.js'
	export default {
		data() {
			return {
			   info:{},
			   code:'',
			}
		},
		onLoad(e){
			this.code = e.code;
			this.getActivityInfo();
		},
		methods: {
			onKefu(){
				window.location.href=this.info.linkOne
			},
			onDownload(){
				window.location.href=this.info.linkTwo
			},
			getActivityInfo(){
			   activitySuccess({params:{code:this.code}}).then(res => {
				   debugger
					if (res.code === 200) {
						console.info(res.data);
						this.info = res.data;
						this.show = true;
					} else {
						uni.hideLoading();
						this.$refs.uToast.show({
							message: res.msg,
							type: 'error',
						})
					}
				});
			},
		}
	}
</script>

<style lang="scss">
page {
  height: 100%;
}
.download{
	position: absolute;
	width: 200rpx;
	height: 200rpx;
	top: calc(100vh - 29%);
}
.kefu{
	position: absolute;
	top: 35%;
	right: 0;
	width: 160rpx;
	height: 80rpx;
}
.lottery-success-container{
	width: 100%;
	height: 100vh;
	background-size: 100% 100%;
	background-position: 50% 50%;
	background-repeat: no-repeat;
	display: flex;
	justify-content: center;
	align-items: center;
}
</style>
